package db.dao;

import db.dto.*;
import db.exceptions.*;

public interface DepartmentDao
{
	/** 
	 * Inserts a new row in the DEPARTMENT table.
	 */
	public int insert(DepartmentDto dto) throws DepartmentDaoException;

	/** 
	 * Updates a single row in the DEPARTMENT table.
	 */
	public void update(int pk, DepartmentDto dto) throws DepartmentDaoException;

	/** 
	 * Deletes a single row in the DEPARTMENT table.
	 */
	public void delete(int pk) throws DepartmentDaoException;

	/** 
	 * Returns the rows from the DEPARTMENT table that matches the specified primary-key value.
	 */
	public DepartmentDto findByPrimaryKey(int pk) throws DepartmentDaoException;



	/** 
	 * Returns all rows from the DEPARTMENT table that match the criteria ''.
	 */
	public DepartmentDto[] findAll() throws DepartmentDaoException;

	/** 
	 * Returns all rows from the DEPARTMENT table that match the criteria 'ID_DEPARTMENT = :idDepartment'.
	 */
	public DepartmentDto[] findWhereIdDepartmentEquals(int idDepartment) throws DepartmentDaoException;

	/** 
	 * Returns all rows from the DEPARTMENT table that match the criteria 'NAME = :name'.
	 */
	public DepartmentDto[] findWhereNameEquals(String name) throws DepartmentDaoException;

	/** 
	 * Sets the value of maxRows
	 */
	public void setMaxRows(int maxRows);

	/** 
	 * Gets the value of maxRows
	 */
	public int getMaxRows();

	/** 
	 * Returns all rows from the DEPARTMENT table that match the specified arbitrary SQL statement
	 */
	public DepartmentDto[] findByDynamicSelect(String sql, Object[] sqlParams) throws DepartmentDaoException;

	/** 
	 * Returns all rows from the DEPARTMENT table that match the specified arbitrary SQL statement
	 */
	public DepartmentDto[] findByDynamicWhere(String sql, Object[] sqlParams) throws DepartmentDaoException;

}
